#ifndef __UART_CONTROL_H
#define __UART_CONTROL_H

#include "main.h"
#include "tim.h"
#include <stdlib.h>
#include "usart.h"
#include <stdio.h>
#include <stdbool.h>
#include <math.h>
#include "dma.h"

void set_position(uint8_t id, int32_t pulses, uint8_t dir, uint16_t speed_rpm, uint8_t sync_flag);
void motor_enable(uint8_t id, bool enable, uint8_t sync_flag);
void sync_motion(uint8_t id);
void clear_position(uint8_t id);
void get_position(uint8_t id);
void generate_motor_commands(int32_t x, int32_t y, uint16_t speed_rpm);
void motor_circle(uint16_t speed_rpm);
void motor_interrupt_zero(uint8_t addr);
void motor_stop(uint8_t addr, uint8_t sync_flag);


#endif
